package com.example.zz_comsumer.controller;

import com.cn.zz.zz_produce.service.PeopleService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: ZhangZengZeng
 * @Date: 2023/3/23 12:24
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @DubboReference(version = "1.0")
    private PeopleService peopleService;

    @RequestMapping("/test")
    public void test(){
        peopleService.selectAll();
    }

    @GetMapping("/{id}")
    public void  selectById(@PathVariable Integer id){
        peopleService.selectById(id);
    }

}

